(*
	videoTime() -- Return the time of the frame the player is currently displaying.

	To compile and link this file using Macintosh Programmer's Workshop,

		pascal -w videoTime.p

		link -m ENTRYPOINT -o HyperCommands -rt XFCN=8007 -sn Main=videoTime ¶
			videoTime.p.o "{MPW}"Libraries:interface.o "{MPW}"PLibraries:PasLib.o

	Copyright © 1988 Apple Computer, Inc.

	2/88 - Initial coding by Harry R. Chesley.
*)

{$R-}

{$S videoTime } 	{ Segment name must be the same as the command name. }

unit DummyUnit;

interface

uses MemTypes, QuickDraw, OSIntf, ToolIntf, HyperXCmd;

procedure EntryPoint(paramPtr: XCmdPtr);
	
implementation

type

Str31 = String[31];

procedure videoTime(paramPtr: XCmdPtr); forward;

procedure EntryPoint(paramPtr: XCmdPtr);

	begin
		videoTime(paramPtr);
	end;

procedure videoTime(paramPtr: XCmdPtr);

	{$I XCmdGlue.inc}

	procedure Fail(errMsg: Str255); { set theResult and quit }
		begin
			paramPtr^.returnValue := PasToZero(errMsg);
			exit(videoTime);
		end;

	{$I VideoUtil.inc}

	begin
		if paramPtr^.paramCount <> 0 then Fail('parameter count is not 0');

		{ Clear out any pending input. }
		EvalAndDispose('recvUpTo(empty,0,empty)');

		paramPtr^.returnValue := PasToZero(videoFunc('time',''))
	end;

end.
